Performance data collection is one of the most
significant new features for SQL Server Administrators. Performance
data collection builds on the strengths of the DMVs to provide
long-term data storage and reporting based on this data. Performance
data collection will assist Administrators with troubleshooting,
performance tuning, and capacity planning.
Performance Data Collection Explained
The
performance data collector is a great new feature and really easy to
get up and running in SQL Server 2008 to collect and store performance
data, providing reports on the collected data. The data collector
itself can be considered a SQL Server client consisting of data
sources, an executable called dcexe.exe, data warehouse database, SQL
Agent jobs, and Integration Services. Available sources include System
Monitor (Perfmon) counters, DMVs, SQL Profiler traces, and application
data/logs.
The
performance data warehouse builds on the strength of the data provided
by DMVs by collecting and reporting on this data. Performance data
collection was designed to be used as an enterprise data repository,
gathering data about all SQL Servers in an environment. Centralizing
data collection and storage reduces the overhead on each monitored
server and provides a single point for reporting. The reports provided
by the performance data warehouse provide information useful when
troubleshooting a problem (i.e., a system performance baseline that is
self-documenting) and with trending and capacity planning. The data can
be useful for retrospective troubleshooting as well as planning for the
future.
The
performance data collection feature consists of two distinct
components, the Management Data Warehouse (MDW) and Data Collections
(DC). The MDW is used to store the data used for reporting. Data
Collectors are used to extract performance data from target SQL Server
instances and to load this data into the MDW. The feature is disabled
by default and both components require configuration prior to use. Data
collection can be performed only by SQL Server 2008 instance and
targets must be SQL Server 2008.
Management Data Warehouse
The
Management Data Warehouse (MDW) is the relational database used to
store the data collected from the monitored servers (data collection
targets). The MDW is just a normal relational database hosted on SQL
Server 2008 that needs to be configured by the Administrator before
data collection can begin. The MDW can be used to capture data from the
same instance, or from remote instances. In many deployment scenarios,
it is intended that MDW is used as an enterprisewide repository for
system and custom collection sets from many target servers. The
management reports are produced using the data stored in the MDW.
Configuring MDW
The
MDW must be set up prior to data collection being configured since the
MDW must be supplied as the target for data collection. To launch the
MDW configuration wizard within Management Studio, within the
Management folder, right-click Data Collection and choose Configure
Management Data Warehouse as shown in Figure 1.
Launching the configuration wizard, the first screen displays a Welcome notice. Click Next to continue, as shown in Figure 2.
The
next step in the wizard is to select either to Create or upgrade a MDW
or to Set up data collection. Since data collection requires an MDW, it
should be set up first. As shown in Figure 3, verify Configure or upgrade a management data warehouse, then click Next.
Next, the wizard requests details of the database to be used as the MDW.
In
most cases, we’ll need to create a new database to use for this
purpose; otherwise, choose an existing database from the drop-down
list. Click the New button to create a new database (shown in Figure 4).
Configure the new database by entering a database name and configuring the locations for data and log files, if necessary (see Figure 5).
It’s worth mentioning that by default the MDW creates the new database
in SIMPLE recovery mode, meaning transaction log management is not
necessary. Administrators requiring point-in-time recovery for the MDW
should change the database to FULL recovery mode and take regular
transaction log backups.
The next step in the MDW process is security configuration, where it is possible to map database users to MDW roles (see Figure 6).
Table 1 summarizes each role and the permissions or purpose of the role.
Table 1. Roles and Their Permissions
Role | Permissions |
---|
mdw_admin | Read/ write/ update/ delete access to MDW |
mdw_writer | Allowed to insert/ upload data to the MDW—required for data collectors |
mdw_reader | Read access to MDW |
To
complete MDW configuration, verify the settings on the summary step of
the wizard and click Finish. The MDW setup is now complete and we can
progress to configure data collection.